package colibri.effects;

public class Rectangle {
  private int x_;
  private int y_;
  private int w_;
  private int h_;
  /** Creates a new instance of Rectangle */
  public Rectangle(int x, int y, int w, int h) {

    x_ = x;
    y_ = y;
    w_ = w;
    h_ = h;
  }
  Rectangle clipWidthFromRight(int w1) {
    int x = x_;
    int y = y_;
    int w = w_ - w1;
    int h = h_;
    return new Rectangle(x, y, w, h);
  }
  Rectangle clipWidthFromLeft(int w1) {
    int x = x_ + w1;
    int y = y_;
    int w = w_ - w1;
    int h = h_;
    return new Rectangle(x, y, w, h);
  }
  public int x() {
    return x_;
  }
  public int y() {
    return y_;
  }
  public int w() {
    return w_;
  }
  public int h() {
    return h_;
  }
}